package com.cqh.recruit.pojo.dto;

import lombok.Data;


public class BasePageDto {

    private Integer page=1;

    private Integer limit=5;

    private Integer startIndex;

    public BasePageDto() {
    }

    public BasePageDto(Integer page, Integer limit, Integer startIndex) {
        this.page = page;
        this.limit = limit;
        this.startIndex = startIndex;
    }

    public Integer getStartIndex() {
        return this.startIndex=(this.page-1)*this.limit;
    }


    /**
     * 获取
     * @return page
     */
    public Integer getPage() {
        return page;
    }

    /**
     * 设置
     * @param page
     */
    public void setPage(Integer page) {
        this.page = page;
    }

    /**
     * 获取
     * @return limit
     */
    public Integer getLimit() {
        return limit;
    }

    /**
     * 设置
     * @param limit
     */
    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    /**
     * 设置
     * @param startIndex
     */
    public void setStartIndex(Integer startIndex) {
        this.startIndex = startIndex;
    }

    public String toString() {
        return "BasePageDto{page = " + page + ", limit = " + limit + ", startIndex = " + startIndex + "}";
    }
}
